import asyncio,time

def hello(name):
    print(f'[hello]Hello,{name}')

async def work(t,name):
    print('[work] start',name)
    await asyncio.sleep(t)
    print(f'[work] {name} after {t}s stop')

def main():
    loop=asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    asyncio.ensure_future(work(1,'A'))
    loop.call_soon(hello,'Tom')
    loop.create_task(work(2,'B'))
    loop.run_until_complete(work(3,'C'))

main()
